package com.terren.spider.entity.core;

import java.util.ArrayList;
import java.util.List;

import com.terren.spider.entity.BasicEntity;

public class Entry extends BasicEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3910203379572216951L;
	private Integer entryId;
	private Integer sourceId;
	private Integer catagoryId;
	private String entryDesc;      // 入口描述
	private String entryUrl;       // 入口URL
	private Integer crawlDepth;      // 爬取的深度
	private Integer maxLinks;          // 爬取的最大链接数量
	private Integer mode;            // 执行模式：1-爬取深度;2-最大数量
	private String urlRegex;       // url匹配正则，多个正则时以半角逗号间隔
	private String urlPrefix;      // 入口前缀，用于拼接相对路径
	private String charset;        // HTML页面字符集
	private Integer entryUseProxy;   // 列表页是否使用代理，默认不启用
	private Integer contentUseProxy; // 内容页是否使用phantomJS代理，默认不启用
	private Integer serverGroup;     // 服务器组编号
	private String proxyHost;      // 代理服务器主机地址
	private Integer proxyPort;       // 代理服务器主机端口
	private Integer dynamic;         // 代理是否启用动态加载内容，默认启用
	private Integer timeout;         // phantomJS服务器连接超时设置，默认60秒，最大180秒
	private Integer status;          // 状态：1-启用，0-停用
	private Integer urlDuplicate;    // URL去重功能：0-禁用，1-启用
	
	private List<HelpUrl> helpUrls = new ArrayList<HelpUrl>();  //列表页
	private List<Regular> regulars = new ArrayList<Regular>(); //抓取页面的配置
	private List<EntryFormat> formats = new ArrayList<EntryFormat>();//url参数配置
	private List<RegularGroupDiv> divList = new ArrayList<RegularGroupDiv>();//div组配置参数
	
	private String select;    //选择内容 【可选】 表示抓取页面指定的某个div
	private Integer selectorType = 0; // 抓取页面 选择器选择 CSS (0)     |  XPATH  (1)
	
	
	/**
	 * 搜索页面抓取
	 */
	private String excludeUrlRegex;       // 不匹配的url匹配正则，多个正则时以半角逗号间隔，用于搜索引擎
	private Integer recordLimit;         //抓取条数（用于搜索引擎）
	private Integer recordSize;         //抓取页面每页显示条数（用于搜索引擎）
	private Long taskId;              //任务id
	private String keyword;              //关键词
	private String excludeKeyword;//不包含的关键词，多个以逗号隔开
	
	private String beginTime; //搜索条件：开始时间
	private String endTime;//搜索条件：结束时间
	
	private Integer groupId;
	private Integer cacheMode;//'缓存方式：对待抓取的URL队列进行管理及URL去重(0:内存 1：文件)'
	private Integer threadNum;//线程数
	private String act;
	private String locale; //语种
	
	
	private List<Entry> subEntry;//用于保存搜索entry所包含的目标网站entry集合
	
	
	
	public List<Entry> getSubEntry() {
		return subEntry;
	}
	public void setSubEntry(List<Entry> subEntry) {
		this.subEntry = subEntry;
	}
	public String getExcludeKeyword() {
		return excludeKeyword;
	}
	public void setExcludeKeyword(String excludeKeyword) {
		this.excludeKeyword = excludeKeyword;
	}
	public List<RegularGroupDiv> getDivList() {
		return divList;
	}
	public void setDivList(List<RegularGroupDiv> divList) {
		this.divList = divList;
	}
	public String getLocale() {
		return locale;
	}
	public void setLocale(String locale) {
		this.locale = locale;
	}
	public String getAct() {
		return act;
	}
	public void setAct(String act) {
		this.act = act;
	}
	public Integer getThreadNum() {
		return threadNum;
	}
	public void setThreadNum(Integer threadNum) {
		this.threadNum = threadNum;
	}
	public Integer getCacheMode() {
		return cacheMode;
	}
	public void setCacheMode(Integer cacheMode) {
		this.cacheMode = cacheMode;
	}
	public String getBeginTime() {
		return beginTime;
	}
	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public Long getTaskId() {
		return taskId;
	}
	public void setTaskId(Long taskId) {
		this.taskId = taskId;
	}
	public Integer getRecordLimit() {
		return recordLimit;
	}
	public void setRecordLimit(Integer recordLimit) {
		this.recordLimit = recordLimit;
	}
	public Integer getRecordSize() {
		return recordSize;
	}
	public void setRecordSize(Integer recordSize) {
		this.recordSize = recordSize;
	}
	public String getExcludeUrlRegex() {
		return excludeUrlRegex;
	}
	public void setExcludeUrlRegex(String excludeUrlRegex) {
		this.excludeUrlRegex = excludeUrlRegex;
	}
	public String getSelect() {
		return select;
	}
	public void setSelect(String select) {
		this.select = select;
	}
	public Integer getSelectorType() {
		return selectorType;
	}
	public void setSelectorType(Integer selectorType) {
		this.selectorType = selectorType;
	}
	public List<Regular> getRegulars() {
		return regulars;
	}
	public void setRegulars(List<Regular> regulars) {
		this.regulars = regulars;
	}
	public List<HelpUrl> getHelpUrls() {
		return helpUrls;
	}
	public void setHelpUrls(List<HelpUrl> helpUrls) {
		this.helpUrls = helpUrls;
	}
	public List<EntryFormat> getFormats() {
		return formats;
	}
	public void setFormats(List<EntryFormat> formats) {
		this.formats = formats;
	}
	public Integer getEntryId() {
		return entryId;
	}
	public void setEntryId(Integer entryId) {
		this.entryId = entryId;
	}
	public Integer getSourceId() {
		return sourceId;
	}
	public void setSourceId(Integer sourceId) {
		this.sourceId = sourceId;
	}
	public Integer getCatagoryId() {
		return catagoryId;
	}
	public void setCatagoryId(Integer catagoryId) {
		this.catagoryId = catagoryId;
	}
	public String getEntryDesc() {
		return entryDesc;
	}
	public void setEntryDesc(String entryDesc) {
		this.entryDesc = entryDesc;
	}
	public String getEntryUrl() {
		return entryUrl;
	}
	public void setEntryUrl(String entryUrl) {
		this.entryUrl = entryUrl;
	}
	public Integer getCrawlDepth() {
		return crawlDepth;
	}
	public void setCrawlDepth(Integer crawlDepth) {
		this.crawlDepth = crawlDepth;
	}
	public Integer getMaxLinks() {
		return maxLinks;
	}
	public void setMaxLinks(Integer maxLinks) {
		this.maxLinks = maxLinks;
	}
	public Integer getMode() {
		return mode;
	}
	public void setMode(Integer mode) {
		this.mode = mode;
	}
	public String getUrlRegex() {
		return urlRegex;
	}
	public void setUrlRegex(String urlRegex) {
		this.urlRegex = urlRegex;
	}
	public String getUrlPrefix() {
		return urlPrefix;
	}
	public void setUrlPrefix(String urlPrefix) {
		this.urlPrefix = urlPrefix;
	}
	public String getCharset() {
		return charset;
	}
	public void setCharset(String charset) {
		this.charset = charset;
	}
	public Integer getEntryUseProxy() {
		return entryUseProxy;
	}
	public void setEntryUseProxy(Integer entryUseProxy) {
		this.entryUseProxy = entryUseProxy;
	}
	public Integer getContentUseProxy() {
		return contentUseProxy;
	}
	public void setContentUseProxy(Integer contentUseProxy) {
		this.contentUseProxy = contentUseProxy;
	}
	public Integer getServerGroup() {
		return serverGroup;
	}
	public void setServerGroup(Integer serverGroup) {
		this.serverGroup = serverGroup;
	}
	public String getProxyHost() {
		return proxyHost;
	}
	public void setProxyHost(String proxyHost) {
		this.proxyHost = proxyHost;
	}
	public Integer getProxyPort() {
		return proxyPort;
	}
	public void setProxyPort(Integer proxyPort) {
		this.proxyPort = proxyPort;
	}
	public Integer getDynamic() {
		return dynamic;
	}
	public void setDynamic(Integer dynamic) {
		this.dynamic = dynamic;
	}
	public Integer getTimeout() {
		return timeout;
	}
	public void setTimeout(Integer timeout) {
		this.timeout = timeout;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Integer getUrlDuplicate() {
		return urlDuplicate;
	}
	public void setUrlDuplicate(Integer urlDuplicate) {
		this.urlDuplicate = urlDuplicate;
	}
	public Integer getGroupId() {
		return groupId;
	}
	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}
	
}
